package com.demo.spring.boot;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class Receiver {
	
	
	//@JmsListeners(value={@JmsListener(destination=""),@JmsListener(destination="")}) 监听多个
	@JmsListener(destination="mailbox",containerFactory="myFactory")
	public void receiveMessage(Email email){
		System.out.println("Received<"+email+">");
	}
}
